package com.jsbs.iam.auth.mapper;

import com.jsbs.iam.auth.param.IamStaticUserGroupDeleteParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IamUserGroupUserRelationMapper {

    /**
     * 功能描述：根据用户编码获取用户组信息
     * @param userCode
     * @param companyCode
     * @return
     */
    List<String> queryByUserCode(@Param("userCode") String userCode, @Param("companyCode") String companyCode);

    /**
     * 功能描述：根据用户编码+租户编码，删除动/静态用户组时，删除关联的用户
     * @param iamStaticUserGroupDeleteParam
     * @return boolean
     */
    boolean deleteUserGroupUserRelation(@Param("iamStaticUserGroupDeleteParam") IamStaticUserGroupDeleteParam iamStaticUserGroupDeleteParam);
}